package com.spring.componentAnnotation;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Controller("boss")
public class Boss {

	@Autowired
	private Car car1;
	
	@Resource(name="office")
	private Office office;
	
	@Override
	public String toString(){
		return "Car: " + car1 + ", Office: " + office;
	}
}
